package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

/**
 * 利用(BufferedReader)高级流按行读取字符串
 */
public class ReadStringDemo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("./src/io/ReadStringDemo2.java");
        InputStreamReader isr=new InputStreamReader(fis, StandardCharsets.UTF_8);
        BufferedReader br=new BufferedReader(isr);
        String line;
        while ((line= br.readLine())!=null){
            System.out.println(line);
        }
        System.out.println("读取完毕");
        br.close();

    }
}
